<!DOCTYPE html>
<html>
	<head >
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/guide.css"/>
		<script src="__INDEX__/js/guide.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/index.css"/>
		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
		<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=dGQhfdH8aKQezNGGjdGfK8C0Lvrg25cK"></script>-->
	</head>
	<body>
		<div class="guide" id="guide">
			<div class="guide-cont">
				<img class="logo" src="{:getImg('logo.png')}" onclick="return false"/>
			</div>
		</div>
	    <header class="mui-bar mui-bar-nav " id="head">
	        <a href="{:url('index/info')}" class="mui-pull-left">
	        	<div class="head-portrait mui-pull-left" data-color="#F8E71D" style="border-radius:50%;width: 45px;height: 45px;overflow: hidden;position: relative;">
					{if $user['portrait']}
	        		<img src="{:getImg($user['portrait'])}" width="100%" style="position: absolute;left: 0;top: 0;"/>
					{else}
					<img src="__INDEX__/images/touxiang.jpg" width="100%" style="position: absolute;left: 0;top: 0;"/>
					{/if}
	        	</div>
	        	<p class="head-name mui-pull-left">{$user['nickname']}</p>
	        </a>
	        <a href="{:url('index/info')}" class="linkDesign mui-pull-right">{$user['company_name']}/{$user['departmen_name']}<span class="mui-icon mui-icon-arrowright "></span></a>
	    </header>
	    <div class="mui-content">
	    	<div class="theMap">
				{if $lianjie==1}
	    		<img src="__INDEX__/images/onWiFI.png" onclick="return false"/>
	    		<p>已连接打卡Wi-Fi</p>
				{else}
	    		<img src="__INDEX__/images/offWiFi.png" onclick="return false"/>
	    		<p>未连接打卡Wi-Fi</p>
				{/if}
	    	</div>
	    	<div class="modular mod-one ">
	    		<div class="dakaModular-top">
	    			<p class="mui-pull-left"><span class="mui-icon iconfont">&#xe622;</span>打卡</p>
	    			<p class="time">上班时间：{$setting['work_shift']}-{$setting['closing_time']}</p>
	    			<a href="{:url('index/setUp')}" class="mui-pull-right">打卡设置<span class="mui-badge mui-badge-success"></a>
	    		</div>
	    		<div class="dakaModular-cont">
	    			<button class="toWork open" time="{$setting['work_shift']}">上班打卡</button>
	    			<button class="offWork open" time="{$setting['closing_time']}">下班打卡</button>
	    		</div>
	    	</div>
	    	<div class="modular">
	    		<div class="basicModular-top">
	    			<p><span class="mui-icon iconfont">&#xe621;</span>基本功能</span></p>
	    		</div>
	    		<div class="basicModular-cont">
	    			<a href="{:url('index/checkWork')}" class="mui-pull-left">
	    				<img src="__INDEX__/images/kaoqing.png"/>
	    				<p class="basicModular-name">考勤</p>
	    			</a>
	    			<a href="{:url('index/leave')}" class="mui-pull-left">
	    				<img src="__INDEX__/images/qingjia.png"/>
	    				<p class="basicModular-name">请假</p>
	    			</a>
	    			<a href="{:url('index/daily')}" class="mui-pull-left">
	    				<img src="__INDEX__/images/ribao.png"/>
	    				<p class="basicModular-name">工作日报</p>
	    			</a>
	    			<a href="{:url('index/weekly')}" class="mui-pull-left">
	    				<img src="__INDEX__/images/zhoubao.png"/>
	    				<p class="basicModular-name">工作周报</p>
	    			</a>
	    			<a href="{:url('index/monthly')}" class="mui-pull-left">
	    				<img src="__INDEX__/images/yuebao.png"/>
	    				<p class="basicModular-name">月总结</p>
	    			</a>
	    			<a href="javascript:;" class="mui-pull-left">
	    				<img src="__INDEX__/images/tianjia.png"/>
	    				<p class="basicModular-name">添加</p>
	    			</a>
	    		</div>
	    	</div>
	    	<div class="modular">
	    		<div class="com-noticeModular-top">
	    			<a href="{:url('index/noticeList')}?name=com" class="hrefNotice">
	    				<p><span class="mui-icon iconfont">&#xe63f;</span>公司公告</span><span class="mui-pull-right mui-icon mui-icon-arrowright"></span></p>
	    			</a>
	    			<div class="noticeModular-cont">
						{foreach $notice['com'] as $value}
	    				<a href="{:url('index/noticeInfo')}?typename=com&id={$value['id']}"><div class="noticeModular-item"><span class="mui-pull-left dian"></span><p>{$value['title']}</p></div></a>
	    				<!--<a href="{:url('index/noticeInfo')}"><div class="noticeModular-item"><span class="mui-pull-left dian"></span><p>当端午节遇上京东6.18怎么办？当然是买买买了，那还用说嘛</p></div></a>-->
	    				<!--<a href="{:url('index/noticeInfo')}"><div class="noticeModular-item"><span class="mui-pull-left dian"></span><p>当端午节遇上京东6.18怎么办？当然是买买买了，那还用说嘛</p></div></a>-->
						{/foreach}
	    			</div>
	    		</div>
	    	</div>
	    	<div class="modular">
	    		<div class="dep-noticeModular-top">
	    			<a href="{:url('index/noticeList')}?name=dep" class="hrefNotice">
	    				<p><span class="mui-icon iconfont">&#xe63f;</span>部门公告</span><span class="mui-pull-right mui-icon mui-icon-arrowright"></span></p>
	    			</a>
	    			<div class="noticeModular-cont">
						{foreach $notice['dep'] as $value}
	    				<a href="{:url('index/noticeInfo')}?typename=dep&id={$value['id']}"><div class="noticeModular-item"><span class="mui-pull-left dian"></span><p>{$value['title']}</p></div></a>
	    				<!--<a href="{:url('index/noticeInfo')}"><div class="noticeModular-item"><span class="mui-pull-left dian"></span><p>当端午节遇上京东6.18怎么办？当然是买买买了，那还用说嘛</p></div></a>-->
	    				<!--<a href="{:url('index/noticeInfo')}"><div class="noticeModular-item"><span class="mui-pull-left dian"></span><p>当端午节遇上京东6.18怎么办？当然是买买买了，那还用说嘛</p></div></a>-->
						{/foreach}
	    			</div>
	    		</div>
	    	</div>
	    </div>
	    <nav class="mui-bar mui-bar-tab footer">
	        <a class="mui-tab-item mui-active" href="javascript:;">
	            <span class="mui-icon mui-icon-home"></span>
	            <span class="mui-tab-label">首页</span>
	        </a>
	        <a class="mui-tab-item"  href="javascript:;">
	            <i class="mui-icon iconfont">&#xe7bd;</i>
	            <span class="mui-tab-label">积分榜</span>
	        </a>
	        <a class="mui-tab-item">
	            <i class="mui-icon iconfont">&#xe64e;</i>
	            <span class="mui-tab-label">平台使用</span>
	        </a>
	        <a class="mui-tab-item">
	            <i class="mui-icon iconfont">&#xe649;</i>
	            <span class="mui-tab-label">个人中心</span>
				{if $newsshu}
				<b class="mui-badge mui-badge-danger weidu" style="position: absolute;top:.03rem;right:.2rem">
					{$newsshu}
				</b>
				{else}
				<b class="mui-badge mui-badge-danger weidu" style="position: absolute;top:.03rem;right:.2rem;display: none">
				</b>
				{/if}
	        </a>
	    </nav>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/index.js" type="text/javascript" charset="utf-8"></script>
		<script>
            setInterval(function() {
                var $num = parseInt(Math.random()*9)+1;
            	$.ajax({
            		async:true,
					url:"/index/Message/index"+$num,
					type:"post",
					success:function(data){
            			if(data.code==200){
							if(data.data!=0){
                                $(".weidu").css("display",'block');
								$(".weidu").text(data.data);
							}else{
							    $(".weidu").css("display",'none');
							}
						}
            		}
            	})
            },60000);
		</script>
		<!--<script type="text/javascript">
			// 百度地图API功能
			var map = new BMap.Map("allmap");    // 创建Map实例
			map.centerAndZoom(new BMap.Point(104.052117,30.689815), 19);  // 初始化地图,设置中心点坐标和地图级别
//			//添加地图类型控件
//			map.addControl(new BMap.MapTypeControl({
//				mapTypes:[
//		            BMAP_NORMAL_MAP,
//		            BMAP_HYBRID_MAP
//		        ]}));	  
		    var point = new BMap.Point(104.052117,30.689566);
		    var marker = new BMap.Marker(point);  // 创建标注
			map.addOverlay(marker);               // 将标注添加到地图中
			map.setCurrentCity("成都");          // 设置地图显示的城市 此项是必须设置的
			map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
			
			var opts = {
			  position : point,    // 指定文本标注所在的地理位置
			  offset   : new BMap.Size(-70, -80)    //设置文本偏移量
			}
			var label = new BMap.Label("<h3 style='font-size:13px'>打卡地址</h3><p style='font-size:12px;margin:0 0 5px 0'>WI-FI创亿宝网络科技</p>", opts);  // 创建文本标注对象
				label.setStyle({
					 color : "#000000",
					 fontSize : "12px",
					 padding : '2px 15px',
					 border : '1px solid #B7B7AF',
					 textAlign : 'center',
					 fontFamily:'微软雅黑',
					 background:'#ffffff',
					 borderRadius : '5px',
					 boxShadow : '0 3px 15px 5px #89887F'
				 });
			map.addOverlay(label);       // 打开信息窗口
		</script>-->
	</body>
</html>
